package com.surfilter.msmp.web.common.enums;

/**
 * 描述 ：
 * 作者 ：WYH
 * 时间 ：2019/12/31 14:57
 **/
public enum  EsCensusEnum {

    //封堵日志
    BLOCK_LOG("msmp_block_log","blockTime.keyword"),
    //入口地址更新
    UPDATE_LOG("msmp_update_log","updateTime.keyword");

    private String index;
    private String rangeField;

    EsCensusEnum(String index,String rangeField){
        this.index = index;
        this.rangeField = rangeField;
    }

    public String getIndex(){
        return index;
    }

    public String getRangeField(){
        return rangeField;
    }

    public static EsCensusEnum getEsCensusEnumByIndex(String index) {
        EsCensusEnum[] values = EsCensusEnum.values();
        for (EsCensusEnum value : values) {
            if (index.equals(value.index)) {
                return value;
            }
        }
        return null;
    }
}
